package com.zx.service.impl;

import com.zx.mapper.SmbmsAddressMapper;
import com.zx.pojo.SmbmsAddress;
import com.zx.pojo.SmbmsUser;
import com.zx.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private SmbmsAddressMapper addressMapper;

    /**
     * 查询所有
     * @return
     */
    @Override
    public List<SmbmsAddress> findAllByUsers1() {
        return addressMapper.findAllByUsers1();
    }

    /**
     * 详情
     * @param uid
     * @return
     */
    @Override
    public SmbmsAddress findUsersById(Long uid) {
        return addressMapper.findUsersById(uid);
    }

    /**
     * 添加用户
     * @param user
     * @return
     */
    @Override
    public boolean addUsers(SmbmsAddress user) {
        return addressMapper.addUsers(user);
    }

    @Override
    public boolean updateUsers(SmbmsAddress user) {
        return addressMapper.updateUsers(user);
    }

    @Override
    public boolean delUsers(Long uid) {
        return addressMapper.delUsers(uid);
    }

}
